
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import 'package:flutter_update_dialog/flutter_update_dialog.dart';

class MyUpdateDialog{
  static UpdateDialog? dialog;
  double progress = 0.0;


  static defaultStyle(BuildContext context,String title,String content) {
    if (dialog != null && dialog!.isShowing()) {
      return;
    }
    dialog = UpdateDialog.showUpdate(context,
        title: title,
        updateContent: content,
        onUpdate: (){
          dialog!.dismiss();
          Get.toNamed("/user/userUpdate");
        });
  }
}